﻿using K9Nano.Configuration;
using K9Nano.Configuration.Startup;

namespace K9Nano.Admin.Settings
{
    public sealed class AdminSettingConfiguration
    {
        public const string Demo = "Demo";

        #region SMS

        public const string Sms_VerificationTemplateId = "Sms.Verification.TemplateId";
        public const string Sms_VerificationLength = "Sms.Verification.Length";
        public const string Sms_VerificationExpires = "Sms.Verification.Expires";

        #endregion SMS

        public static void Create()
        {
            StartupConfiguration.Global.SettingDefinitionManager
                .Create(new[]
                {
                    new SettingDefinition(
                        Demo,
                        "demo",
                        "示例",
                        "demo demo",
                        isVisibleToClients:true
                    ),
                });

            #region SMS

            StartupConfiguration.Global.SettingDefinitionManager
                .Create(new[]
                {
                    new SettingDefinition(
                        Sms_VerificationTemplateId,
                        "5ee2ecbb7293da38d031ba2c",
                        "短信验证码模板ID",
                        "短信验证码模板ID",
                        scopes: ESettingScopes.Application | ESettingScopes.Tenant,
                        isVisibleToClients: false
                    ),
                });
            StartupConfiguration.Global.SettingDefinitionManager
                .Create(new[]
                {
                    new SettingDefinition(
                        Sms_VerificationLength,
                        "4",
                        "短信验证码长度",
                        "短信验证码长度",
                        scopes: ESettingScopes.Application | ESettingScopes.Tenant,
                        isVisibleToClients: false
                    ),
                });
            StartupConfiguration.Global.SettingDefinitionManager
                .Create(new[]
                {
                    new SettingDefinition(
                        Sms_VerificationExpires,
                        "120",
                        "短信验证码有效期",
                        "短信验证码有效期，秒",
                        scopes:  ESettingScopes.Application | ESettingScopes.Tenant,
                        isVisibleToClients: false
                    ),
                });

            #endregion SMS

        }
    }
}